﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ResponsivadetFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ResponsivadetBE
        Dim tmpResponsivadet As ResponsivadetBE = New ResponsivadetBE()
        Try
            With tmpResponsivadet
                .Actividad = convertDTFromDb.ConvertString(dr.Item("Actividad"))
                .Cliente = convertDTFromDb.ConvertString(dr.Item("Cliente"))
                .Concepto = convertDTFromDb.ConvertString(dr.Item("Concepto"))
                .Dif = convertDTFromDb.ConvertDecimal(dr.Item("Dif"))
                .Efectivo = convertDTFromDb.ConvertDecimal(dr.Item("Efectivo"))
                .Entregado = convertDTFromDb.ConvertShort(dr.Item("Entregado"))
                .GastosD = convertDTFromDb.ConvertDecimal(dr.Item("GastosD"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IdR = convertDTFromDb.convertInt32(dr.Item("IdR"))
                .Importe1 = convertDTFromDb.ConvertDecimal(dr.Item("Importe1"))
                .Importe2 = convertDTFromDb.ConvertDecimal(dr.Item("Importe2"))
                .Importe3 = convertDTFromDb.ConvertDecimal(dr.Item("Importe3"))
                .Item = convertDTFromDb.ConvertShort(dr.Item("Item"))
                .Numero = convertDTFromDb.convertInt32(dr.Item("Numero"))
                .Obs = convertDTFromDb.ConvertString(dr.Item("Obs"))
                .Serie = convertDTFromDb.ConvertString(dr.Item("Serie"))
                .Tipo = convertDTFromDb.ConvertString(dr.Item("Tipo"))
                .TotCobFC = convertDTFromDb.ConvertDecimal(dr.Item("TotCobFC"))
                .TotCobFE = convertDTFromDb.ConvertDecimal(dr.Item("TotCobFE"))
                .TotCobRE = convertDTFromDb.ConvertDecimal(dr.Item("TotCobRE"))
                .Vend = convertDTFromDb.ConvertShort(dr.Item("Vend"))
                End With
            Return tmpResponsivadet
        Catch ex As Exception
            Throw
        Finally
            tmpResponsivadet = Nothing
        End Try
    End Function
End Class
